﻿<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">
    <title>Home mbzj.net</title>
    <link rel="stylesheet" href="/static/assets/css/font-awesome.min.css">
    <link rel="stylesheet" href="/static/assets/css/bootstrap.min.css">
    <link rel="stylesheet" href="/static/assets/css/style.css">
    <link href='http://fonts.googleapis.com/css?family=Open+Sans:600italic,400,800,700,300' rel='stylesheet'
          type='text/css'>
    <link href='http://fonts.googleapis.com/css?family=BenchNine:300,400,700' rel='stylesheet' type='text/css'>
    <script src="/static/assets/js/modernizr.js"></script>
    <!--[if lt IE 9]>
    <script src="/static/assets/js/html5shiv.js"></script>
    <script src="/static/assets/js/respond.min.js"></script>
    <![endif]-->

</head>
<body>


<header>
    <div class="container">
        <div class="row">
            <div class="col-xs-5 header-logo">
                <br>
                <a href="index.html"><img src="/static/assets/img/logo.png" alt="" class="img-responsive logo"></a>
            </div>
            <div class="col-md-7">
                <nav class="navbar navbar-default">
                    <div class="container-fluid nav-bar">
                        <!-- Brand and toggle get grouped for better mobile display -->


                        <!-- Collect the nav links, forms, and other content for toggling -->
                        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">

                            <ul class="nav navbar-nav navbar-right">

                                <li><a class="/index" href="/home">数据页</a></li>
                                <li><a class="menu" href="#service">our services </a></li>
                                <li><a class="menu" href="#team">our team</a></li>

                            </ul>
                        </div>
                    </div>
                </nav>
            </div>
        </div>
    </div>
</header> <!-- end of header area -->

<body>
<section class="about text-center" id="about">
    <div class="container">
        <div class="row">
            <h2>爬虫控制页面</h2>
            <form method="post">
                <button type="submit" class="btn btn-success">开始爬取</button>
            </form>

            <h3>爬取结果（共{{ results|length }}条）</h3>
            <div class="result-list">
                {% if results %}  <!-- 检查 results 是否为 None 或空列表 -->
                {% for item in results %}
                {% if item %}  <!-- 检查单个 item 是否为 None -->
                <p class="result-item">{{ item }}</p>
                {% else %}
                <p class="result-item">[无效数据]</p>
                {% endif %}
                {% endfor %}
                {% else %}
                <p class="result-item">暂无数据</p>
                {% endif %}
            </div>

        </div>
    </div>
</section>
</body>
<!-- about section -->


<!-- script tags
============================================================= -->
<style>
    .result-item {
      padding: 8px;
      border-bottom: 1px solid #eee;
    }
    .result-item:last-child {
      border-bottom: none;
    }
</style>

<script src="/static/assets/js/jquery-2.1.1.js"></script>

<script src="/static/assets/js/gmaps.js"></script>
<script src="/static/assets/js/smoothscroll.js"></script>
<script src="/static/assets/js/bootstrap.min.js"></script>
<script src="/static/assets/js/custom.js"></script>
</body>
</html>